<section class="section {page->class}">
	<h2 class="hide">{page->title}</h2>
	<script>
		$(function() {
			$("#anniversary_add").validate({
				submitHandler : function(form) {
					// ajax로 등록후 list 페이지 새로 고침
					$.ajax({
						 url : form.action
						,data : $(form).serialize()
						,success:function(data){
							if(data.code == mesg.success) {
								sagapo.section_refresh(data.return_url);
							} else {
								alert(data.msg);
							}
							
							return false;
						}
					});		
				}
			});
			
			setTimeout(function() {
				$("#{module}_day").datepicker();	
			}, 300);
		});
	</script>
	<form name="anniversary_add" id="anniversary_add" method="post" action="{action}/doAdd">
		<table class="table">
			<caption>
				{page->title}
			</caption>
			<colgroup>
				<col class="add" />
				<col />
			</colgroup>
			<tbody>
				<tr>
					<th scope="row" class="txt_right br"><label for="{module}_name">기념일 명</label></th>
					<td><input type="text" name="{module}_name" id="{module}_name" class="{module}_name required width_90" placeholder="기념일 명" /></td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="{module}_solar">양/음력</label></th>
					<td>
						<input type="radio" name="{module}_is_solar" id="{module}_solar" value="1" checked="checked" />
						<label for="{module}_solar">양력</label>
						<input type="radio" name="{module}_is_solar" id="{module}_lunar" value="0" />
						<label for="{module}_lunar">음력</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="{module}_day">기념일</label></th>
					<td><input type="text" name="{module}_day" id="{module}_day" class="{module}_day" placeholder="기념일" /></td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="{module}_d_day">계산방법</label></th>
					<td>
						<input type="radio" name="{module}_display" id="{module}_d_day" value="0" checked="checked" />
						<label for="{module}_d_day">D-Day</label>
						<input type="radio" name="{module}_display" id="{module}_days" value="1" />
						<label for="{module}_days">날짜수</label>
						<input type="radio" name="{module}_display" id="{module}_repeat" value="2" />
						<label for="{module}_repeat">반복</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="{module}_main">메인표시</label></th>
					<td>
						<input type="checkbox" name="{module}_main" id="{module}_main" value="1" />
						<label for="{module}_main">메인표시</label>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="button_area">
			<button type="submit">전송</button>
		</div>
	</form>
</section>